﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Base.Data.Migrations
{
    public partial class user_sub_sq_job : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "job_class",
                table: "t_user",
                type: "character varying(200)",
                maxLength: 200,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "position_code",
                table: "t_user",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "sequ_code",
                table: "t_user",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "sequ_name",
                table: "t_user",
                type: "character varying(200)",
                maxLength: 200,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "sex",
                table: "t_user",
                type: "integer",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "subsq_code",
                table: "t_user",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "subsq_name",
                table: "t_user",
                type: "character varying(200)",
                maxLength: 200,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "work_territory",
                table: "t_user",
                type: "integer",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "depart_id",
                table: "t_member",
                type: "character varying(50)",
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "alias_user_id",
                table: "t_department",
                type: "character varying(50)",
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "is_line",
                table: "t_department",
                type: "boolean",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "user_id",
                table: "t_department",
                type: "character varying(50)",
                maxLength: 50,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "job_class",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "position_code",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "sequ_code",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "sequ_name",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "sex",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "subsq_code",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "subsq_name",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "work_territory",
                table: "t_user");

            migrationBuilder.DropColumn(
                name: "depart_id",
                table: "t_member");

            migrationBuilder.DropColumn(
                name: "alias_user_id",
                table: "t_department");

            migrationBuilder.DropColumn(
                name: "is_line",
                table: "t_department");

            migrationBuilder.DropColumn(
                name: "user_id",
                table: "t_department");
        }
    }
}
